feat: Add support for hardhat-deploy#249
Conversation
contracts/optimistic-ethereum/libraries/resolver/Lib_AddressResolver.sol
Show resolved
Hide resolved
|
|
||
| const libAddressManager = await Proxy__OVM_L1CrossDomainMessenger.libAddressManager() | ||
| if (libAddressManager !== Lib_AddressManager.address) { | ||
| throw new Error( |
There was a problem hiding this comment.
We can do some cool post-deploy verification checks now!
| @@ -0,0 +1,12 @@ | |||
| export const predeploys = { | |||
There was a problem hiding this comment.
A nice to have imo would be to export these as contract objects that are already connected to the correct address
There was a problem hiding this comment.
Yeah, will leave that for a future PR.
| ovmRelayerAddress: process.env.RELAYER_ADDRESS, | ||
| }) | ||
| } | ||
|
|
There was a problem hiding this comment.
Small nit as then needs to be deprecated
;(async () => {
const addresses = await main()
console.log(JSON.stringify(addresses, null, 2))
})().catch(err => {
})There was a problem hiding this comment.
Was following https://hardhat.org/guides/scripts.html. And the ;(...)() syntax was giving me a lot of headache with the linter so I went with this.
778251b to
0be6832
Compare
ben-chain
left a comment
There was a problem hiding this comment.
Requested a few nit changes, but looking great!
| @@ -0,0 +1,3 @@ | |||
| CONTRACTS_TARGET_NETWORK= | |||
There was a problem hiding this comment.
Can we comment these for extra completion points? :D
| process.exit(1); | ||
| }); | ||
| const contracts = dirtree( | ||
| path.resolve(__dirname, `../deployments/custom`) |
There was a problem hiding this comment.
this "custom" really means "CI" right now
| await registerAddress({ | ||
| hre, | ||
| name: 'OVM_Proposer', | ||
| address: (hre as any).deployConfig.ovmSequencerAddress, |
There was a problem hiding this comment.
| address: (hre as any).deployConfig.ovmSequencerAddress, | |
| address: (hre as any).deployConfig.ovmProposerAddress, |
(even if these are the same now might as well(
| } | ||
| ) | ||
|
|
||
| await OVM_L1CrossDomainMessenger.initialize(Lib_AddressManager.address) |
There was a problem hiding this comment.
can we add a clarifying comment here that this is technically not required? Just for auditability
| signerOrProvider: deployer, | ||
| }) | ||
|
|
||
| await OVM_L1ETHGateway.initialize( |
There was a problem hiding this comment.
ditto above -- comment on redundant initialization for auditability :)
…/contracts into feat/hardhat-deploy-v2
Description
Adding new support for
hardhat-deployas an alternative to our bespoke deployment system.hardhat-deployis quite nice and generates very clean artifacts. Next step should be to remove the old deployment system when possible. Though we might have to do something about generating state dumps.fixes #256
fixes #116
Contributing Agreement